package gerardoapps;

import sistemas.sam.R;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class Menu_Profesor extends Activity implements OnClickListener{

	
	TextView profe,matri;
	String matricula;
	Button calif;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.menu__profesor);
		
		profe=(TextView) findViewById(R.id.nombre);
		matri=(TextView) findViewById(R.id.matricula);
		
		Bundle bundle=getIntent().getExtras();
		 
		 matri.setText("Matricula : \n"+bundle.getString("id"));
		 matricula=bundle.getString("id");
		
		ServerAccess ss= new ServerAccess();
		Constants.nombreP=""+ss.Paterno(matricula);
	profe.setText("Profesor : "+Constants.nombreP);
		calif=(Button) findViewById(R.id.calif);
		calif.setOnClickListener(this);
	}
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		if(v.getId()==R.id.calif){
			Intent i=new Intent(this,DatosProfesor.class);
			Bundle bundle = new Bundle();
			bundle.putString("id",matricula);
			
			i.putExtras(bundle);
			
			startActivity(i);
		}
	}

	

}
